-- GENERATED SPELL FOR [Apprentice Osterkilgr] --


function spell0_30409(pUnit, Event) --@Blast Wave,Self--
pUnit:FullCastSpellOnTarget(60290,pUnit)
pUnit:RegisterEvent('Sorts_30409', 6277, 1)
end

function spell1_30409(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(14034,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30409', 3000, 1)
end

function Sorts_30409(pUnit, Event)
local choix_sorts_30409 = math.random(0, 1)
if choix_sorts_30409 == 0 then
pUnit:RegisterEvent('spell0_30409', 1, 1)
end
if choix_sorts_30409 == 1 then
pUnit:RegisterEvent('spell1_30409', 1, 1)
end
end

function mob30409_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30409', math.random(1500, 3000), 1)
end

function mob30409_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30409_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30409_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30409, 1, 'mob30409_Action')
RegisterUnitEvent(30409, 2, 'mob30409_Leave')
RegisterUnitEvent(30409, 3, 'mob30409_Kill')
RegisterUnitEvent(30409, 4, 'mob30409_Die')
